package com.google.code.virtualhockey.vhx.client;

import com.google.code.virtualhockey.vhx.client.res.VhxResources;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.Widget;
import com.mvp4g.client.Mvp4gModule;

/**
 * Entry point for VHX' GWT based UI.
 */
public class VhxEntryPoint implements EntryPoint {

  @Override
  public void onModuleLoad() {
    VhxResources.INSTANCE.style().ensureInjected();
    Mvp4gModule module = (Mvp4gModule) GWT.create( Mvp4gModule.class );
    module.createAndStartModule();
    RootLayoutPanel.get().add( (Widget) module.getStartView() );
  }
}
